# 1 元素输出和查找:请输出0-50之间的奇数，偶数，质数；能同时被2和3整除的数；
from math import sqrt


def is_even_number(i):
    if i % 2 == 0:
        return True
    else:
        return False


def is_prime_number(i):
    if i == 1 or i == 0:
        return False
    for j in range(2, int(sqrt(i)) + 1):
        if i % j == 0:
            return False
    return True


def divisible(i):
    if i % 2 == 0 and i % 3 == 0:
        return True


if __name__ == '__main__':
    odd_numbers = []
    even_numbers = []
    prime_numbers = []
    divisible_numbers = []
    for i in range(50):
        if is_even_number(i):
            even_numbers.append(i)
        else:
            odd_numbers.append(i)

        if is_prime_number(i):
            prime_numbers.append(i)
        if divisible(i):
            divisible_numbers.append(i)

    print('odd_numbers', odd_numbers)
    print('even_numbers', even_numbers)
    print('prime_numbers', prime_numbers)
    print('numbers can be divided by 2 and 3', divisible_numbers)
